package com.ming.base.authority.dao;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.ming.base.authority.po.SysUserPO;
import com.ming.core.exception.BaseException;
/**
 * 用户DAO
 * @author chenhuaming
 * @Time：2017年2月22日 下午3:44:42
 * @version 1.0  
 * Function: TODO
 */
@Repository("userDao")
public interface UserDao {
	/**
	 * 根据id查询用户
	 * getUser:() 
	 * @author chenhuaming 
	 * @param id
	 * @return
	 */
	@Select(" select * from sys_user where id=#{id} ")
	public SysUserPO getUser(String id) throws BaseException ;
	/**
	 * 根据用户名查询用户详情
	 * getUserByName:() 
	 * @author chenhuaming 
	 * @param name
	 * @return
	 * @throws BaseException
	 */
	@Select(" select * from sys_user where user_name=#{name} ")
	public SysUserPO getUserByName(String name)throws BaseException;
}
